package com.cssw.fyzb.wap.service;

import com.cssw.fyzb.base.web.domain.AjaxData;
import com.cssw.fyzb.wap.model.vo.ParamVo;
import com.cssw.fyzb.wap.model.vo.SdkInfoVo;
import com.ydn.appserver.MinaAppClient;
import com.ydn.appserver.Request;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Feng Chen
 */
@Service
public class SysParamService extends BaseService {

    @Autowired
    private MinaAppClient busiClient;

    /**
     * 获取sdk信息
     *
     * @return
     */
    public AjaxData<SdkInfoVo> getSdkInfo() {
        Request request = new Request("GetSdkInfo");
        return convertData(busiClient.send(request), SdkInfoVo.class);
    }

    public AjaxData<ParamVo> getParam(String name, String force) {
        Request request = new Request("GetParam");
        request.setParameter("name", name);
        request.setParameter("force", force);
        return convertData(busiClient.send(request), ParamVo.class);
    }


}
